package io.gitee.zhangbinhub.acp.boot.health

import io.gitee.zhangbinhub.acp.boot.constant.AcpCoreConstant
import org.noear.solon.health.detector.Detector

class AcpBootDetector : Detector {
    override fun getName(): String = AcpCoreConstant.MODULE_NAME

    override fun getInfo(): MutableMap<String, *> {
        val info: MutableMap<String, String?> = HashMap()
        info[AcpCoreConstant.INFO_VERSION_KEY] = getVersion()
        return info
    }

    private fun getVersion(): String? {
        return AcpBootDetector::class.java.getPackage()?.implementationVersion
    }
}